using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Runtime.Serialization;

namespace Shrapnel.Areas
{
	/// <summary>
	/// A base class for any part of an area. It is always defined in world space.
	/// </summary>
	[DataContract()]	
	public abstract class Part
	{
		/// <summary>
		/// Calculate the bounding box for this part
		/// </summary>
		/// <returns></returns>
		public abstract BoundingBox GetBoundingBox();

		/// <summary>
		/// Move this part with the provided delta
		/// </summary>
		/// <param name="delta">Offset to apply</param>
		public abstract void Move(PointF delta);


		/// <summary>
		/// Precise overlapping check
		/// </summary>
		/// <param name="bbox">A worlspace bbox</param>
		/// <returns>Return true when this part overlaps with the given bbox</returns>
		public abstract bool OverlapsWith(BoundingBox bbox);
		
	}
}
